import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore(
	'userStrore', ()=>{
		 const userInfo = ref()
		 const setUserInfo=(val)=>{
			 userInfo.value=val
		 }
		 const clearUserInfo=()=>{
			 userInfo.value=undefined
		 }
		 return{
			 userInfo,
			 setUserInfo,
			 clearUserInfo
		 }
	},
	{
		unistorage: true,
	}
)